// app.js
App({
  globalData: {
    w:0,
    h:0,
    h2:0,
    login_key:'',
    isCollect:false
  },
  onLaunch() {
    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)
    console.log(logs)
    //获取系统信息，获取窗口宽高度
    wx.getSystemInfo({
      success: (res) => {
        this.globalData.w = res.windowWidth;
        this.globalData.h = res.windowHeight;
        this.globalData.h2 = res.safeArea.height;
      },
    })
  },
})